/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.modules.system.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.persistence.*;
import javax.validation.constraints.*;
import java.io.Serializable;

/**
* @website https://el-admin.vip
* @description /
* @author 王宇
* @date 2025-09-21
**/
@Entity
@Data
@Table(name="group_test_detail")
public class GroupTestDetail implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    @ApiModelProperty(value = "主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Column(name = "group_id")
    @ApiModelProperty(value = "团测主表主健ID")
    private Long groupId;

    @Column(name = "qr_code_url")
    @ApiModelProperty(value = "二维码地址")
    private String qrCodeUrl;

    @Column(name = "qr_code_text")
    @ApiModelProperty(value = "二维码内容")
    private String qrCodeText;

    @Column(name = "serial_number")
    @ApiModelProperty(value = "索引")
    private Integer serialNumber;

    @Column(name = "serial_code")
    @ApiModelProperty(value = "编号（唯一）")
    private String serialCode;

    @Column(name = "tested")
    @ApiModelProperty(value = "已测人数")
    private Integer tested;

    public void copy(GroupTestDetail source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}